public class Compressor
{
   public String compressImage(String imageColors)
   {
      // your work here   
      int len = 1;
      String words = "";
      for(int i = 0;i < imageColors.length()-1;i++){
         if(imageColors.charAt(i) == imageColors.charAt(i+1)){
            len++;
         }else{
            words += String.valueOf(len);
            words += imageColors.charAt(i);
            len = 1;
         }
         
      }
      words += String.valueOf(len);
      words += imageColors.charAt(imageColors.length()-1);
      return words;
   } 
}